Integrand size = 23, antiderivative size = 105 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=-\frac {(a-b)^2 \log (\cos (e+f x))}{f}-\frac {(a-b)^2 \tan ^2(e+f x)}{2 f}+\frac {(a-b)^2 \tan ^4(e+f x)}{4 f}+\frac {(2 a-b) b \tan ^6(e+f x)}{6 f}+\frac {b^2 \tan ^8(e+f x)}{8 f} \]
-(a-b)^2*ln(cos(f*x+e))/f-1/2*(a-b)^2*tan(f*x+e)^2/f+1/4*(a-b)^2*tan(f*x+e )^4/f+1/6*(2*a-b)*b*tan(f*x+e)^6/f+1/8*b^2*tan(f*x+e)^8/f
Time = 0.39 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.85 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {-24 (a-b)^2 \log (\cos (e+f x))-12 (a-b)^2 \tan ^2(e+f x)+6 (a-b)^2 \tan ^4(e+f x)+4 (2 a-b) b \tan ^6(e+f x)+3 b^2 \tan ^8(e+f x)}{24 f} \]
(-24*(a - b)^2*Log[Cos[e + f*x]] - 12*(a - b)^2*Tan[e + f*x]^2 + 6*(a - b) ^2*Tan[e + f*x]^4 + 4*(2*a - b)*b*Tan[e + f*x]^6 + 3*b^2*Tan[e + f*x]^8)/( 24*f)
Time = 0.30 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.93, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4153, 354, 99, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (e+f x)^5 \left (a+b \tan (e+f x)^2\right )^2dx\) |
\(\Big \downarrow \) 4153 |
\(\displaystyle \frac {\int \frac {\tan ^5(e+f x) \left (b \tan ^2(e+f x)+a\right )^2}{\tan ^2(e+f x)+1}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 354 |
\(\displaystyle \frac {\int \frac {\tan ^4(e+f x) \left (b \tan ^2(e+f x)+a\right )^2}{\tan ^2(e+f x)+1}d\tan ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 99 |
\(\displaystyle \frac {\int \left (b^2 \tan ^6(e+f x)+(2 a-b) b \tan ^4(e+f x)+(a-b)^2 \tan ^2(e+f x)-(a-b)^2+\frac {(a-b)^2}{\tan ^2(e+f x)+1}\right )d\tan ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{3} b (2 a-b) \tan ^6(e+f x)+\frac {1}{2} (a-b)^2 \tan ^4(e+f x)-(a-b)^2 \tan ^2(e+f x)+(a-b)^2 \log \left (\tan ^2(e+f x)+1\right )+\frac {1}{4} b^2 \tan ^8(e+f x)}{2 f}\) |
((a - b)^2*Log[1 + Tan[e + f*x]^2] - (a - b)^2*Tan[e + f*x]^2 + ((a - b)^2 *Tan[e + f*x]^4)/2 + ((2*a - b)*b*Tan[e + f*x]^6)/3 + (b^2*Tan[e + f*x]^8) /4)/(2*f)
3.2.98.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | | (GtQ[m, 0] && GeQ[n, -1]))
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S ymbol] :> Simp[1/2 Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x , x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ [(m - 1)/2]
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[c*(ff/f) Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio nalQ[n]))
Time = 0.09 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.09
method | result | size |
norman | \(\frac {b^{2} \tan \left (f x +e \right )^{8}}{8 f}-\frac {\left (a^{2}-2 a b +b^{2}\right ) \tan \left (f x +e \right )^{2}}{2 f}+\frac {\left (a^{2}-2 a b +b^{2}\right ) \tan \left (f x +e \right )^{4}}{4 f}+\frac {\left (2 a -b \right ) b \tan \left (f x +e \right )^{6}}{6 f}+\frac {\left (a^{2}-2 a b +b^{2}\right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f}\) | \(114\) |
derivativedivides | \(\frac {\frac {b^{2} \tan \left (f x +e \right )^{8}}{8}+\frac {a b \tan \left (f x +e \right )^{6}}{3}-\frac {b^{2} \tan \left (f x +e \right )^{6}}{6}+\frac {a^{2} \tan \left (f x +e \right )^{4}}{4}-\frac {a b \tan \left (f x +e \right )^{4}}{2}+\frac {b^{2} \tan \left (f x +e \right )^{4}}{4}-\frac {a^{2} \tan \left (f x +e \right )^{2}}{2}+\tan \left (f x +e \right )^{2} a b -\frac {b^{2} \tan \left (f x +e \right )^{2}}{2}+\frac {\left (a^{2}-2 a b +b^{2}\right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}}{f}\) | \(143\) |
default | \(\frac {\frac {b^{2} \tan \left (f x +e \right )^{8}}{8}+\frac {a b \tan \left (f x +e \right )^{6}}{3}-\frac {b^{2} \tan \left (f x +e \right )^{6}}{6}+\frac {a^{2} \tan \left (f x +e \right )^{4}}{4}-\frac {a b \tan \left (f x +e \right )^{4}}{2}+\frac {b^{2} \tan \left (f x +e \right )^{4}}{4}-\frac {a^{2} \tan \left (f x +e \right )^{2}}{2}+\tan \left (f x +e \right )^{2} a b -\frac {b^{2} \tan \left (f x +e \right )^{2}}{2}+\frac {\left (a^{2}-2 a b +b^{2}\right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}}{f}\) | \(143\) |
parts | \(\frac {a^{2} \left (\frac {\tan \left (f x +e \right )^{4}}{4}-\frac {\tan \left (f x +e \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {b^{2} \left (\frac {\tan \left (f x +e \right )^{8}}{8}-\frac {\tan \left (f x +e \right )^{6}}{6}+\frac {\tan \left (f x +e \right )^{4}}{4}-\frac {\tan \left (f x +e \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {2 a b \left (\frac {\tan \left (f x +e \right )^{6}}{6}-\frac {\tan \left (f x +e \right )^{4}}{4}+\frac {\tan \left (f x +e \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}\) | \(155\) |
parallelrisch | \(\frac {3 b^{2} \tan \left (f x +e \right )^{8}+8 a b \tan \left (f x +e \right )^{6}-4 b^{2} \tan \left (f x +e \right )^{6}+6 a^{2} \tan \left (f x +e \right )^{4}-12 a b \tan \left (f x +e \right )^{4}+6 b^{2} \tan \left (f x +e \right )^{4}-12 a^{2} \tan \left (f x +e \right )^{2}+24 \tan \left (f x +e \right )^{2} a b -12 b^{2} \tan \left (f x +e \right )^{2}+12 \ln \left (1+\tan \left (f x +e \right )^{2}\right ) a^{2}-24 \ln \left (1+\tan \left (f x +e \right )^{2}\right ) a b +12 \ln \left (1+\tan \left (f x +e \right )^{2}\right ) b^{2}}{24 f}\) | \(168\) |
risch | \(i a^{2} x -2 i a b x +i b^{2} x +\frac {2 i a^{2} e}{f}-\frac {4 i a b e}{f}+\frac {2 i b^{2} e}{f}-\frac {4 \left (3 a^{2} {\mathrm e}^{14 i \left (f x +e \right )}-9 a b \,{\mathrm e}^{14 i \left (f x +e \right )}+6 b^{2} {\mathrm e}^{14 i \left (f x +e \right )}+15 a^{2} {\mathrm e}^{12 i \left (f x +e \right )}-36 a b \,{\mathrm e}^{12 i \left (f x +e \right )}+18 b^{2} {\mathrm e}^{12 i \left (f x +e \right )}+33 a^{2} {\mathrm e}^{10 i \left (f x +e \right )}-79 a b \,{\mathrm e}^{10 i \left (f x +e \right )}+50 b^{2} {\mathrm e}^{10 i \left (f x +e \right )}+42 a^{2} {\mathrm e}^{8 i \left (f x +e \right )}-104 a b \,{\mathrm e}^{8 i \left (f x +e \right )}+52 b^{2} {\mathrm e}^{8 i \left (f x +e \right )}+33 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}-79 a b \,{\mathrm e}^{6 i \left (f x +e \right )}+50 b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+15 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}-36 a b \,{\mathrm e}^{4 i \left (f x +e \right )}+18 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+3 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}-9 a b \,{\mathrm e}^{2 i \left (f x +e \right )}+6 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}\right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{8}}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) a^{2}}{f}+\frac {2 \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) a b}{f}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) b^{2}}{f}\) | \(416\) |
1/8*b^2*tan(f*x+e)^8/f-1/2*(a^2-2*a*b+b^2)/f*tan(f*x+e)^2+1/4*(a^2-2*a*b+b ^2)/f*tan(f*x+e)^4+1/6*(2*a-b)*b*tan(f*x+e)^6/f+1/2*(a^2-2*a*b+b^2)/f*ln(1 +tan(f*x+e)^2)
Time = 0.26 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.02 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {3 \, b^{2} \tan \left (f x + e\right )^{8} + 4 \, {\left (2 \, a b - b^{2}\right )} \tan \left (f x + e\right )^{6} + 6 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{4} - 12 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{2} - 12 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right )}{24 \, f} \]
1/24*(3*b^2*tan(f*x + e)^8 + 4*(2*a*b - b^2)*tan(f*x + e)^6 + 6*(a^2 - 2*a *b + b^2)*tan(f*x + e)^4 - 12*(a^2 - 2*a*b + b^2)*tan(f*x + e)^2 - 12*(a^2 - 2*a*b + b^2)*log(1/(tan(f*x + e)^2 + 1)))/f
Leaf count of result is larger than twice the leaf count of optimal. 206 vs. \(2 (82) = 164\).
Time = 0.24 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.96 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\begin {cases} \frac {a^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a^{2} \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac {a^{2} \tan ^{2}{\left (e + f x \right )}}{2 f} - \frac {a b \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} + \frac {a b \tan ^{6}{\left (e + f x \right )}}{3 f} - \frac {a b \tan ^{4}{\left (e + f x \right )}}{2 f} + \frac {a b \tan ^{2}{\left (e + f x \right )}}{f} + \frac {b^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {b^{2} \tan ^{8}{\left (e + f x \right )}}{8 f} - \frac {b^{2} \tan ^{6}{\left (e + f x \right )}}{6 f} + \frac {b^{2} \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac {b^{2} \tan ^{2}{\left (e + f x \right )}}{2 f} & \text {for}\: f \neq 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right )^{2} \tan ^{5}{\left (e \right )} & \text {otherwise} \end {cases} \]
Piecewise((a**2*log(tan(e + f*x)**2 + 1)/(2*f) + a**2*tan(e + f*x)**4/(4*f ) - a**2*tan(e + f*x)**2/(2*f) - a*b*log(tan(e + f*x)**2 + 1)/f + a*b*tan( e + f*x)**6/(3*f) - a*b*tan(e + f*x)**4/(2*f) + a*b*tan(e + f*x)**2/f + b* *2*log(tan(e + f*x)**2 + 1)/(2*f) + b**2*tan(e + f*x)**8/(8*f) - b**2*tan( e + f*x)**6/(6*f) + b**2*tan(e + f*x)**4/(4*f) - b**2*tan(e + f*x)**2/(2*f ), Ne(f, 0)), (x*(a + b*tan(e)**2)**2*tan(e)**5, True))
Time = 0.22 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.54 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=-\frac {12 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \log \left (\sin \left (f x + e\right )^{2} - 1\right ) - \frac {24 \, {\left (a^{2} - 3 \, a b + 2 \, b^{2}\right )} \sin \left (f x + e\right )^{6} - 6 \, {\left (11 \, a^{2} - 30 \, a b + 18 \, b^{2}\right )} \sin \left (f x + e\right )^{4} + 4 \, {\left (15 \, a^{2} - 38 \, a b + 22 \, b^{2}\right )} \sin \left (f x + e\right )^{2} - 18 \, a^{2} + 44 \, a b - 25 \, b^{2}}{\sin \left (f x + e\right )^{8} - 4 \, \sin \left (f x + e\right )^{6} + 6 \, \sin \left (f x + e\right )^{4} - 4 \, \sin \left (f x + e\right )^{2} + 1}}{24 \, f} \]
-1/24*(12*(a^2 - 2*a*b + b^2)*log(sin(f*x + e)^2 - 1) - (24*(a^2 - 3*a*b + 2*b^2)*sin(f*x + e)^6 - 6*(11*a^2 - 30*a*b + 18*b^2)*sin(f*x + e)^4 + 4*( 15*a^2 - 38*a*b + 22*b^2)*sin(f*x + e)^2 - 18*a^2 + 44*a*b - 25*b^2)/(sin( f*x + e)^8 - 4*sin(f*x + e)^6 + 6*sin(f*x + e)^4 - 4*sin(f*x + e)^2 + 1))/ f
Leaf count of result is larger than twice the leaf count of optimal. 3275 vs. \(2 (97) = 194\).
Time = 11.46 (sec) , antiderivative size = 3275, normalized size of antiderivative = 31.19 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\text {Too large to display} \]
-1/24*(12*a^2*log(4*(tan(f*x)^2*tan(e)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(f*x )^2*tan(e)^2 + tan(f*x)^2 + tan(e)^2 + 1))*tan(f*x)^8*tan(e)^8 - 24*a*b*lo g(4*(tan(f*x)^2*tan(e)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(f*x)^2*tan(e)^2 + t an(f*x)^2 + tan(e)^2 + 1))*tan(f*x)^8*tan(e)^8 + 12*b^2*log(4*(tan(f*x)^2* tan(e)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(f*x)^2*tan(e)^2 + tan(f*x)^2 + tan( e)^2 + 1))*tan(f*x)^8*tan(e)^8 + 18*a^2*tan(f*x)^8*tan(e)^8 - 44*a*b*tan(f *x)^8*tan(e)^8 + 25*b^2*tan(f*x)^8*tan(e)^8 - 96*a^2*log(4*(tan(f*x)^2*tan (e)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(f*x)^2*tan(e)^2 + tan(f*x)^2 + tan(e)^ 2 + 1))*tan(f*x)^7*tan(e)^7 + 192*a*b*log(4*(tan(f*x)^2*tan(e)^2 - 2*tan(f *x)*tan(e) + 1)/(tan(f*x)^2*tan(e)^2 + tan(f*x)^2 + tan(e)^2 + 1))*tan(f*x )^7*tan(e)^7 - 96*b^2*log(4*(tan(f*x)^2*tan(e)^2 - 2*tan(f*x)*tan(e) + 1)/ (tan(f*x)^2*tan(e)^2 + tan(f*x)^2 + tan(e)^2 + 1))*tan(f*x)^7*tan(e)^7 + 1 2*a^2*tan(f*x)^8*tan(e)^6 - 24*a*b*tan(f*x)^8*tan(e)^6 + 12*b^2*tan(f*x)^8 *tan(e)^6 - 120*a^2*tan(f*x)^7*tan(e)^7 + 304*a*b*tan(f*x)^7*tan(e)^7 - 17 6*b^2*tan(f*x)^7*tan(e)^7 + 12*a^2*tan(f*x)^6*tan(e)^8 - 24*a*b*tan(f*x)^6 *tan(e)^8 + 12*b^2*tan(f*x)^6*tan(e)^8 + 336*a^2*log(4*(tan(f*x)^2*tan(e)^ 2 - 2*tan(f*x)*tan(e) + 1)/(tan(f*x)^2*tan(e)^2 + tan(f*x)^2 + tan(e)^2 + 1))*tan(f*x)^6*tan(e)^6 - 672*a*b*log(4*(tan(f*x)^2*tan(e)^2 - 2*tan(f*x)* tan(e) + 1)/(tan(f*x)^2*tan(e)^2 + tan(f*x)^2 + tan(e)^2 + 1))*tan(f*x)^6* tan(e)^6 + 336*b^2*log(4*(tan(f*x)^2*tan(e)^2 - 2*tan(f*x)*tan(e) + 1)/...
Time = 11.90 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.08 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )\,\left (\frac {a^2}{2}-a\,b+\frac {b^2}{2}\right )+{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (\frac {a\,b}{3}-\frac {b^2}{6}\right )+\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^8}{8}-{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {a^2}{2}-a\,b+\frac {b^2}{2}\right )+{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (\frac {a^2}{4}-\frac {a\,b}{2}+\frac {b^2}{4}\right )}{f} \]